var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/businessComponent/work-flow/WFVerticalPanel.tsx
var WFVerticalPanel_exports = {};
__export(WFVerticalPanel_exports, {
  WFVerticalPanel: () => WFVerticalPanel
});
module.exports = __toCommonJS(WFVerticalPanel_exports);
var import_icons = require("@ant-design/icons");
var import_antd = require("antd");
var import_react = require("react");
var import_baseComponent = require("../../baseComponent");
var import_configComponent = require("../../configComponent");
var import_functionalComponent = require("../../functionalComponent");
var import_util = require("../../util");
var import_constVar = require("./constVar");
var import_service = require("./service");
var import_util2 = require("./util");
var import_WFApprovalProgress = __toESM(require("./WFApprovalProgress"));
var import_WFCommonPhrases = require("./WFCommonPhrases");
var webkitLineClampStyle = {
  display: "-webkit-box",
  WebkitBoxOrient: "vertical",
  overflow: "hidden",
  textOverflow: "ellipsis",
  WebkitLineClamp: 2,
  lineHeight: "1.5em"
};
var IcontMapp = {
  "1": import_constVar.submitIcon,
  "2": import_constVar.submitIcon,
  // 会签的同意/提交
  "3": import_constVar.rollbackIcon,
  // 会签的驳回/回退
  "4": import_constVar.rollbackIcon,
  "5": import_constVar.addSubTaskIcon,
  "6": import_constVar.reassignIcon,
  "90": import_constVar.taskRetrieveIcon,
  "99": import_constVar.terminateIcon,
  "999": import_constVar.todoIcon,
  "9999": import_constVar.nextIcon
};
var approvalPointRener = (riskLevel) => {
  let approvalPointItem = { color: "#00CC33", name: "无风险" };
  switch (riskLevel) {
    case 1:
      approvalPointItem = { color: "#00CC33", name: "无风险" };
      break;
    case 2:
      approvalPointItem = { color: "#0081CC", name: "低" };
      break;
    case 3:
      approvalPointItem = { color: "#FE890C", name: "中" };
      break;
    case 4:
      approvalPointItem = { color: "red", name: "高" };
      break;
  }
  return approvalPointItem;
};
var InitWrapStyle = {
  width: "460px",
  backgroundColor: "#FFFFFF"
};
var postScriptListDom = (list) => {
  return /* @__PURE__ */ React.createElement(React.Fragment, null, list && list.length && list.map((v, idx) => {
    return /* @__PURE__ */ React.createElement(
      "div",
      {
        key: v.id,
        style: {
          padding: "6px 0",
          borderBottom: idx === list.length - 1 ? "none" : "1px solid rgba(0, 0, 0, .06)"
        }
      },
      /* @__PURE__ */ React.createElement("div", { style: { ...webkitLineClampStyle, width: "100%", maxHeight: "46px" } }, /* @__PURE__ */ React.createElement(import_antd.Tooltip, { title: v.postScript }, /* @__PURE__ */ React.createElement("span", null, v.postScript))),
      /* @__PURE__ */ React.createElement(
        "div",
        {
          style: {
            display: "flex",
            justifyContent: "space-between",
            fontSize: 12,
            padding: "3px 0"
          }
        },
        /* @__PURE__ */ React.createElement("span", null, v.insertDt),
        !!v.fileCount && /* @__PURE__ */ React.createElement("span", { onClick: () => (0, import_util2.showTaskAttachment)(v, 0), style: { color: "#0D81CC" } }, /* @__PURE__ */ React.createElement(import_icons.PaperClipOutlined, null), "(x", v.fileCount, ")")
      )
    );
  }));
};
var postScirptListCollapse = (postScriptList, index, opened, toggleShowMorePostScript) => {
  let text = opened ? "收起" : "展开更多";
  let icon = opened ? /* @__PURE__ */ React.createElement(import_icons.UpOutlined, null) : /* @__PURE__ */ React.createElement(import_icons.DownOutlined, null);
  const list = opened ? postScriptList : postScriptList.slice(0, 1);
  const renderText = () => {
    return /* @__PURE__ */ React.createElement(React.Fragment, null, postScriptListDom(list), /* @__PURE__ */ React.createElement(
      "div",
      {
        style: { height: "26px", fontSize: 12, color: "#0D81CC" },
        onClick: () => toggleShowMorePostScript(index, opened)
      },
      /* @__PURE__ */ React.createElement("span", null, text, " ", icon)
    ));
  };
  return /* @__PURE__ */ React.createElement("div", null, renderText());
};
var TextExpandCollapse = (text, expanded, index, toggleExpand) => {
  const maxChars = 75;
  const renderText = () => {
    if (expanded) {
      return /* @__PURE__ */ React.createElement(React.Fragment, null, text, /* @__PURE__ */ React.createElement(
        "span",
        {
          onClick: () => {
            toggleExpand(index, expanded);
          },
          style: { cursor: "pointer", color: "blue" }
        },
        "收起"
      ));
    }
    const shouldExpand = text.length > maxChars;
    return /* @__PURE__ */ React.createElement(React.Fragment, null, shouldExpand ? `${text.slice(0, maxChars - 4)}...` : text, shouldExpand && /* @__PURE__ */ React.createElement(
      "span",
      {
        onClick: () => {
          toggleExpand(index, expanded);
        },
        style: { cursor: "pointer", color: "#0D81CC" }
      },
      "查看全部"
    ));
  };
  return /* @__PURE__ */ React.createElement("div", null, renderText());
};
var hisData = [];
var superProcInstId;
var WfHistoryTimeline = ({ workFlowInfo, histroyTimeLineState = true }) => {
  const [historyList, setHistoryList] = (0, import_react.useState)(new Array());
  let toggleStateList = [];
  const handleToggleContent = (index, state) => {
    toggleStateList[index] = !state;
    const hisDom = dataToDom(hisData);
    setHistoryList(hisDom);
  };
  let toggleApprovalPointsStateList = [];
  const handleToggleApprovalPoints = async (index, state) => {
    toggleApprovalPointsStateList[index] = !state;
    const hisDom = dataToDom(hisData);
    setHistoryList(hisDom);
  };
  let expendedStateList = [];
  const toggleExpand = (index, state) => {
    expendedStateList[index] = !state;
    const hisDom = dataToDom(hisData);
    setHistoryList(hisDom);
  };
  let postScriptStateList = [];
  const toggleShowMorePostScript = (index, state) => {
    postScriptStateList[index] = !state;
    const hisDom = dataToDom(hisData);
    setHistoryList(hisDom);
  };
  const dataToDom = (data) => {
    return data.map((i, index) => {
      return {
        label: /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              display: "flex",
              flexDirection: "column",
              alignItems: "center",
              textAlign: "center",
              marginRight: "-120px"
            }
          },
          /* @__PURE__ */ React.createElement("div", { style: { color: "#333333 " } }, i.actionName),
          /* @__PURE__ */ React.createElement("div", { style: { fontSize: "12px", width: "72px", color: "#666666 " } }, i.time)
        ),
        children: !i.isSubProcessInstance ? /* @__PURE__ */ React.createElement("div", { style: { height: !toggleStateList[index] ? "auto" : "60px" } }, /* @__PURE__ */ React.createElement(
          "div",
          {
            onClick: () => {
              handleToggleContent(index, toggleStateList[index]);
            },
            style: {
              width: "287px",
              height: "30px",
              backgroundColor: "#F2F3F4",
              display: "flex",
              alignItems: "center",
              paddingLeft: "27px",
              cursor: "pointer"
            }
          },
          /* @__PURE__ */ React.createElement("span", { style: { width: "10px" } }, !toggleStateList[index] ? import_constVar.arrowUpIcon : import_constVar.arrowDownIcon),
          /* @__PURE__ */ React.createElement("span", { style: { width: "20px", margin: "0 7px", paddingTop: "6px" } }, import_constVar.manIcon),
          /* @__PURE__ */ React.createElement("span", { style: { fontWeight: "bold" } }, i.nodeName)
        ), !toggleStateList[index] && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { margin: "11px 0 6px  33px" } }, i.userName), /* @__PURE__ */ React.createElement("div", { style: { fontSize: "12px", width: "287px", color: "#666666 ", paddingLeft: "33px" } }, TextExpandCollapse(i.message, expendedStateList[index], index, toggleExpand)), !!i.postScriptList && /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              backgroundColor: "#F2F3F4",
              borderRadius: "4px",
              width: "260px",
              margin: "11px 0px 6px 25px",
              cursor: "pointer",
              padding: "0 6px",
              height: postScriptStateList[index] ? "auto" : "104px"
            }
          },
          postScirptListCollapse(
            i.postScriptList,
            index,
            postScriptStateList[index],
            toggleShowMorePostScript
          )
        ), !!i.fileCount && /* @__PURE__ */ React.createElement("div", { style: { fontSize: "12px", width: "62px", color: "#666666 ", marginLeft: "33px" } }, "附件:", /* @__PURE__ */ React.createElement("span", { style: { color: "#0D81CC" } }, /* @__PURE__ */ React.createElement(
          import_icons.PaperClipOutlined,
          {
            onClick: () => {
              (0, import_util2.showTaskAttachment)(i, 0);
            }
          }
        ), i.fileCount)), !!i.approvalPoints && /* @__PURE__ */ React.createElement(
          "div",
          {
            style: { fontSize: "12px", width: "287px", marginLeft: "33px", color: "#666666", marginTop: "5px" }
          },
          /* @__PURE__ */ React.createElement(
            "span",
            {
              onClick: () => {
                handleToggleApprovalPoints(index, toggleApprovalPointsStateList[index]);
              },
              style: {
                display: "flex",
                alignItems: "center",
                color: "#000000",
                fontSize: "14px",
                fontWeight: "bold",
                cursor: "pointer",
                position: "relative",
                left: "-34px"
              }
            },
            toggleApprovalPointsStateList[index] ? import_constVar.arrowDownIcon1 : import_constVar.arrowDownIcon2,
            /* @__PURE__ */ React.createElement("span", { style: { marginLeft: "5px" } }, "审批要点:")
          ),
          toggleApprovalPointsStateList[index] && i.approvalPointRuntimeDtoList.map((j, index2) => {
            var _a, _b, _c, _d, _e;
            return /* @__PURE__ */ React.createElement("div", { style: { marginTop: "10px" } }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
              "span",
              {
                style: {
                  display: "inline-block",
                  width: "16px",
                  height: "16px",
                  borderRadius: "50%",
                  backgroundColor: "#0081cc",
                  color: "#ffffff",
                  textAlign: "center",
                  fontSize: "12px",
                  lineHeight: "16px",
                  marginRight: "2px"
                }
              },
              index2 + 1
            ), /* @__PURE__ */ React.createElement("span", { style: { fontWeight: "bold" } }, j.name)), /* @__PURE__ */ React.createElement("div", { style: { marginLeft: "18px" } }, j.description), /* @__PURE__ */ React.createElement(
              "div",
              {
                style: {
                  color: approvalPointRener((_a = j.details) == null ? void 0 : _a[0].riskLevel).color,
                  marginLeft: "18px",
                  marginBottom: "5px",
                  fontWeight: "bold"
                }
              },
              approvalPointRener((_b = j.details) == null ? void 0 : _b[0].riskLevel).name
            ), /* @__PURE__ */ React.createElement(
              "div",
              {
                style: {
                  width: "max-content",
                  border: "1px solid #0281CC",
                  borderRadius: "3px",
                  marginLeft: "18px",
                  padding: "3px 6px 3px 6px",
                  color: "#0281CC",
                  backgroundColor: "#E5F8FF "
                }
              },
              (_c = j.details) == null ? void 0 : _c[0].optionValue
            ), ((_d = j.details) == null ? void 0 : _d[0].remark) && /* @__PURE__ */ React.createElement("div", null, "备注：", (_e = j.details) == null ? void 0 : _e[0].remark));
          })
        ), !!i.nextDataList && i.nextDataList.map((v) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              width: "287px",
              height: "30px",
              backgroundColor: "#F2F3F4",
              display: "flex",
              alignItems: "center",
              paddingLeft: "27px",
              cursor: "pointer"
            }
          },
          /* @__PURE__ */ React.createElement("span", { style: { width: "20px", margin: "0 7px 0 17px", paddingTop: "6px" } }, import_constVar.manIcon),
          /* @__PURE__ */ React.createElement("span", { style: { fontWeight: "bold" } }, v.nodeName)
        ), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { width: "287px", margin: "11px 0px 6px 33px" } }, v.userName)))))) : /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              height: "50px"
            }
          },
          /* @__PURE__ */ React.createElement(
            "div",
            {
              onClick: () => {
                getHistoryList(i.processInstanceId);
              },
              style: {
                width: "287px",
                height: "30px",
                backgroundColor: "#F2F3F4",
                display: "flex",
                alignItems: "center",
                paddingLeft: "22px",
                cursor: "pointer"
              }
            },
            /* @__PURE__ */ React.createElement("span", { style: { width: "20px", margin: "0 7px", paddingTop: "6px" } }, import_constVar.subProcessIcon),
            /* @__PURE__ */ React.createElement("span", { style: { fontWeight: "bold" } }, "子流程")
          )
        ),
        dot: /* @__PURE__ */ React.createElement("span", null, IcontMapp[i.action ? i.action : "1"])
      };
    });
  };
  const getHistoryList = async (procInstId) => {
    var _a, _b;
    hisData = await (0, import_service.getWorkFlowHis)({ procInstId });
    superProcInstId = (_b = (_a = hisData == null ? void 0 : hisData.filter((i) => !i.isSubProcessInstance)) == null ? void 0 : _a[0]) == null ? void 0 : _b.superProcInstId;
    if (workFlowInfo.taskId) {
      const todoData = await (0, import_service.getToDoInfo)(workFlowInfo.taskId);
      if (todoData) {
        hisData.unshift({
          action: "999",
          actionName: "待办",
          userName: todoData.userName,
          message: `停留${todoData.duration}`,
          nodeName: todoData.nodeName
        });
      }
      const nextData = await (0, import_service.getNextUserTaskNodes)(workFlowInfo.taskId);
      if (nextData && Array.isArray(nextData) && nextData.length) {
        let nextFirstData = {
          action: "9999",
          actionName: "即将流向",
          message: "",
          ...nextData.shift()
        };
        if (nextData.length > 0) {
          nextFirstData.nextDataList = [...nextData];
        }
        hisData.unshift({ ...nextFirstData });
      }
    }
    const hisDom = dataToDom(hisData);
    setHistoryList(hisDom);
  };
  (0, import_util.useAsyncEffect)(async () => {
    getHistoryList(workFlowInfo.procInstId);
  }, [workFlowInfo.procInstId, workFlowInfo.taskId]);
  return /* @__PURE__ */ React.createElement(React.Fragment, null, superProcInstId && /* @__PURE__ */ React.createElement(
    "div",
    {
      onClick: () => getHistoryList(superProcInstId),
      style: {
        cursor: "pointer",
        marginBottom: "22px"
      }
    },
    /* @__PURE__ */ React.createElement(import_icons.ArrowLeftOutlined, null),
    " 返回主流程"
  ), /* @__PURE__ */ React.createElement(
    import_antd.Timeline,
    {
      style: { position: "relative", left: "-100px", display: histroyTimeLineState ? "block" : "none" },
      mode: "left",
      items: historyList
    }
  ));
};
var ProcessItem = (options, workFlowInfo, taskDealInfo, icommonWordHelp, getSignatureId) => {
  const [histroyTimeLineState, setHistroyTimeLine] = (0, import_react.useState)(true);
  const [commonWordHelp, setCommonWordHelp] = (0, import_react.useState)(icommonWordHelp);
  const [commonWordListShow, setCommonWordListShow] = (0, import_react.useState)(false);
  const [signatureId, setSignatureId] = (0, import_react.useState)("");
  const onSuggestChange = (0, import_util.useRefCallback)((sv) => {
    import_util.iup.getCmp("SuggestValue").getApi().setValue(sv || "");
  });
  const openApprovalProgressModal = () => {
    (0, import_util2.wfModal)({
      title: import_util2.NGLang.approvalProgress,
      closable: true,
      width: 800,
      content: /* @__PURE__ */ React.createElement(import_WFApprovalProgress.default, { taskId: workFlowInfo.taskId })
    });
  };
  const buttons = new Array();
  if (workFlowInfo.processOperateOptions.submit != void 0) {
    buttons.push({
      id: "wfbtn_taskcomplete",
      text: import_util2.NGLang.btnSubmit,
      icon: "",
      onClick: async () => {
        taskDealInfo.action = workFlowInfo.processOperateOptions.submit.operation;
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.submit.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.submit.requiredSignature;
        await options.taskComplete(0);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.agree != void 0) {
    buttons.push({
      id: "wfbtn_agree",
      text: import_util2.NGLang.btnAgree,
      icon: "",
      onClick: async () => {
        taskDealInfo.action = workFlowInfo.processOperateOptions.agree.operation;
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.agree.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.agree.requiredSignature;
        await options.taskComplete(0);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.disagree != void 0) {
    buttons.push({
      id: "wfbtn_disagree",
      text: import_util2.NGLang.btnDisagree,
      icon: "",
      onClick: async () => {
        taskDealInfo.action = workFlowInfo.processOperateOptions.disagree.operation;
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.disagree.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.disagree.requiredSignature;
        await options.taskComplete(40);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.rollback != void 0) {
    buttons.push({
      id: "wfbtn_rollback",
      text: import_util2.NGLang.btnrollback,
      icon: "",
      onClick: async () => {
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.rollback.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.rollback.requiredSignature;
        await options.rollBack(0);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.reassign != void 0) {
    buttons.push({
      id: "wfbtn_transmit",
      text: import_util2.NGLang.btntransmit,
      icon: "",
      onClick: async () => {
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.reassign.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.reassign.requiredSignature;
        await options.taskReassign(1);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.addSubTask != void 0) {
    buttons.push({
      id: "wfbtn_addsubtis",
      text: import_util2.NGLang.btnAddsubtis,
      icon: "",
      onClick: async () => {
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.addSubTask.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.addSubTask.requiredSignature;
        await options.addSubTasks(1);
      }
    });
  }
  if (workFlowInfo.processOperateOptions.terminate != void 0) {
    buttons.push({
      id: "wfbtn_terminate",
      text: import_util2.NGLang.btnAbort,
      icon: "",
      onClick: async () => {
        workFlowInfo.minCommentLen = workFlowInfo.processOperateOptions.terminate.minCommentLength;
        workFlowInfo.needsignature = workFlowInfo.processOperateOptions.terminate.requiredSignature;
        await options.flowTerminate(1);
      }
    });
  }
  if (Array.isArray(workFlowInfo.approvalPoints)) {
    if (workFlowInfo.approvalPoints.length > 0) {
      buttons.push({
        id: "wfbtn_approvalPoint",
        text: import_util2.NGLang.approvalPoint,
        icon: "",
        onClick: () => options.approvalPoints(false)
      });
    }
  }
  if (workFlowInfo.processOperateOptions.copy != void 0) {
    buttons.push({
      id: "wfbtn_carboncopy",
      text: import_util2.NGLang.carbonCopy,
      icon: "",
      onClick: () => options.carbonCopy()
    });
  }
  const SignaturePasswordModal = ({ data }) => {
    const [ins] = (0, import_functionalComponent.useModal)();
    const config = [
      {
        name: "name",
        label: "签章名称",
        xtype: "Input",
        disabled: true
      },
      {
        name: "Password",
        label: "签章密码",
        xtype: "Password",
        require: true
      }
    ];
    return /* @__PURE__ */ React.createElement(import_configComponent.Form, { value: data, colspan: 1, config });
  };
  const getSignatureInfo = async () => {
    const data = await (0, import_service.getSignatureByUser)();
    if (data) {
      if (data.password && data.password.length > 0) {
        const res = await (0, import_util2.wfModal)({
          title: import_util2.NGLang.signaturePassword,
          width: 600,
          content: /* @__PURE__ */ React.createElement(SignaturePasswordModal, { data })
        });
        if (res) {
          if (data.Password !== import_util.iup.CryptoJS.decode(data.password)) {
            import_antd.message.error(import_util2.NGLang.pwdError);
          } else {
            getSignatureId(data.fileId);
            setSignatureId((0, import_util.getIUPFilePreviewUrl)(data.fileId).url);
          }
        }
      } else {
        getSignatureId(data.fileId);
        setSignatureId((0, import_util.getIUPFilePreviewUrl)(data.fileId).url);
      }
    } else {
      import_antd.message.warning("请先维护个人签章!");
    }
  };
  return /* @__PURE__ */ React.createElement(import_util.Layout, null, /* @__PURE__ */ React.createElement(import_functionalComponent.ToolBar, { id: "toolBar_WFVerticalPanel", buttons }), /* @__PURE__ */ React.createElement(import_baseComponent.TextArea, { id: "SuggestValue", rows: 4, placeholder: import_util2.NGLang.emptyRemarkInfo }), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(
    "span",
    {
      onClick: () => {
        setCommonWordListShow(!commonWordListShow);
      },
      style: { position: "absolute", cursor: "pointer", left: "12px", top: "-30px", zIndex: "50" }
    },
    import_constVar.qipaoIcon
  ), /* @__PURE__ */ React.createElement(
    "span",
    {
      onClick: () => {
        getSignatureInfo();
      },
      style: { position: "absolute", cursor: "pointer", left: "42px", top: "-30px", zIndex: "50" }
    },
    import_constVar.signatureIcon
  ), /* @__PURE__ */ React.createElement(
    "div",
    {
      style: {
        display: commonWordListShow ? "block" : "none",
        position: "absolute",
        zIndex: "999",
        top: "5px"
      }
    },
    /* @__PURE__ */ React.createElement(
      import_antd.List,
      {
        style: {
          height: "238px",
          overflowY: "scroll",
          backgroundColor: "#ffffff",
          width: "460px",
          border: "2px solid rgba(5, 5, 5, 0.06)",
          paddingLeft: "20px"
        },
        header: /* @__PURE__ */ React.createElement("div", { style: { width: "100%", textAlign: "right", paddingRight: "15px" } }, /* @__PURE__ */ React.createElement(
          import_icons.FormOutlined,
          {
            style: { color: "#0081CC" },
            onClick: () => {
              (0, import_util2.wfModal)({
                title: import_util2.NGLang.commonPhrases,
                width: 800,
                cancelText: "",
                content: /* @__PURE__ */ React.createElement(
                  import_WFCommonPhrases.WFCommonPhrases,
                  {
                    callback: () => {
                      (0, import_service.getCommonWordHelp)().then((res) => {
                        setCommonWordHelp(res);
                      });
                    }
                  }
                )
              });
            }
          }
        )),
        dataSource: commonWordHelp,
        renderItem: (item) => {
          return /* @__PURE__ */ React.createElement(import_antd.List.Item, null, /* @__PURE__ */ React.createElement(
            import_antd.List.Item.Meta,
            {
              description: /* @__PURE__ */ React.createElement(
                "div",
                {
                  style: {
                    width: "300px",
                    whiteSpace: "nowrap",
                    overflow: "hidden",
                    textOverflow: "ellipsis",
                    cursor: "pointer",
                    color: "#333333",
                    fontWeight: "bold"
                  },
                  onClick: () => {
                    setCommonWordListShow(false);
                    onSuggestChange(item.content);
                  }
                },
                item.content
              )
            }
          ));
        }
      }
    )
  )), workFlowInfo.mustUploadApprovalAttachment && /* @__PURE__ */ React.createElement(
    "div",
    {
      style: {
        display: "flex",
        flexDirection: "row",
        justifyContent: "space-between",
        alignItems: "center",
        marginTop: "14px"
      }
    },
    /* @__PURE__ */ React.createElement("div", null),
    /* @__PURE__ */ React.createElement(
      import_functionalComponent.Button,
      {
        onClick: async () => {
          options.processAttachment();
        }
      },
      /* @__PURE__ */ React.createElement(import_icons.UploadOutlined, null),
      "上传附件"
    )
  ), signatureId && /* @__PURE__ */ React.createElement(
    "div",
    {
      style: {
        width: "100%",
        border: "1px solid rgba(0, 0, 0, .06)",
        marginTop: "5px"
      }
    },
    /* @__PURE__ */ React.createElement(import_antd.Image, { src: signatureId })
  ), /* @__PURE__ */ React.createElement(
    "div",
    {
      style: {
        width: "100%",
        display: "flex",
        justifyContent: "space-between",
        alignItems: "center",
        paddingTop: "18px"
      }
    },
    /* @__PURE__ */ React.createElement("span", null, "审批进度"),
    /* @__PURE__ */ React.createElement("span", { style: { color: "#008ee0", cursor: "pointer" }, onClick: openApprovalProgressModal }, workFlowInfo.processProgress)
  ), /* @__PURE__ */ React.createElement(import_util.Layout.Flex, { style: { paddingTop: "18px" } }, /* @__PURE__ */ React.createElement(
    "div",
    {
      style: { cursor: "pointer", marginBottom: "22px", display: "flex", alignItems: "center" },
      onClick: () => {
        setHistroyTimeLine(!histroyTimeLineState);
      }
    },
    /* @__PURE__ */ React.createElement("span", null, "审批历史"),
    /* @__PURE__ */ React.createElement("span", { style: { paddingLeft: "7px", paddingTop: "4px" } }, histroyTimeLineState ? import_constVar.arrowDownIcon1 : import_constVar.arrowDownIcon2)
  ), /* @__PURE__ */ React.createElement(WfHistoryTimeline, { workFlowInfo, histroyTimeLineState })), /* @__PURE__ */ React.createElement(
    "div",
    {
      style: { color: "#0D81CC", textAlign: "right", cursor: "pointer" },
      onClick: () => {
        (0, import_util2.showFlowInfoByPiId)(workFlowInfo.procInstId);
      }
    },
    "查看流程图"
  ));
};
var renderItems = (options, workFlowInfo, taskDealInfo, commonWordHelp, getSignatureId) => {
  return [
    // {
    //     key: '1',
    //     label: '审批要点',
    //     children: '审批要点',
    // },
    {
      key: "2",
      label: "审批办理",
      children: ProcessItem(options, workFlowInfo, taskDealInfo, commonWordHelp, getSignatureId)
    }
  ];
};
function WFVerticalPanel({
  options,
  workFlowInfo,
  taskDealInfo,
  styles = void 0,
  commonWordHelp,
  getSignatureId
}) {
  const wrapStyle = styles ? styles : InitWrapStyle;
  (0, import_react.useEffect)(() => {
  }, []);
  return /* @__PURE__ */ React.createElement(import_util.Layout, { style: wrapStyle }, /* @__PURE__ */ React.createElement(
    import_functionalComponent.Tabs,
    {
      defaultActiveKey: "2",
      items: renderItems(options, workFlowInfo, taskDealInfo, commonWordHelp, getSignatureId),
      centered: true
    }
  ));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  WFVerticalPanel
});
